home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_qt.idb / usr / freeware / include / Qt / qmainwindow.h.z / qmainwindow.h
Encoding:
C/C++ Source or Header  |  1998-10-28  |  2.3 KB  |  95 lines

  1. /****************************************************************************
  2. ** $Id: qmainwindow.h,v 2.17 1998/07/03 00:09:51 hanord Exp $
  3. **
  4. ** Definition of QMainWindow class
  5. **
  6. ** Created : 980316
  7. **
  8. ** Copyright (C) 1992-1998 Troll Tech AS.  All rights reserved.
  9. **
  10. ** This file is part of Qt Free Edition, version 1.40.
  11. **
  12. ** See the file LICENSE included in the distribution for the usage
  13. ** and distribution terms, or http://www.troll.no/free-license.html.
  14. **
  15. ** IMPORTANT NOTE: You may NOT copy this file or any part of it into
  16. ** your own programs or libraries.
  17. **
  18. ** Please see http://www.troll.no/pricing.html for information about 
  19. ** Qt Professional Edition, which is this same library but with a
  20. ** license which allows creation of commercial/proprietary software.
  21. **
  22. *****************************************************************************/
  23.  
  24. #ifndef QMAINWINDOW_H
  25. #define QMAINWINDOW_H
  26.  
  27. #ifndef QT_H
  28. #include "qwidget.h"
  29. #endif // QT_H
  30.  
  31. class QMenuBar;
  32. class QToolBar;
  33. class QStatusBar;
  34. class QToolTipGroup;
  35.  
  36. class QMainWindowPrivate;
  37.  
  38.  
  39. class QMainWindow: public QWidget
  40. {
  41.     Q_OBJECT
  42. public:
  43.     QMainWindow( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
  44.     ~QMainWindow();
  45.  
  46.     QMenuBar * menuBar() const;
  47.     QStatusBar * statusBar() const;
  48.     QToolTipGroup * toolTipGroup() const;
  49.  
  50.     virtual void setCentralWidget( QWidget * );
  51.     QWidget * centralWidget() const;
  52.  
  53.     enum ToolBarDock { Unmanaged, TornOff, Top, Bottom, Right, Left };
  54.  
  55.     void setDockEnabled( ToolBarDock dock, bool enable );
  56.     bool isDockEnabled( ToolBarDock dock ) const;
  57.  
  58.     void addToolBar( QToolBar *, const char * label,
  59.              ToolBarDock = Top, bool newLine = FALSE );
  60.     void removeToolBar( QToolBar * );
  61.  
  62.     void show();
  63.  
  64.     bool rightJustification() const;
  65.     bool usesBigPixmaps() const;
  66.  
  67.     bool eventFilter( QObject*, QEvent* );
  68.  
  69. public slots:
  70.     void setRightJustification( bool );
  71.     void setUsesBigPixmaps( bool );
  72.  
  73. signals:
  74.     void pixmapSizeChanged( bool );
  75.  
  76. protected slots:
  77.     void setUpLayout();
  78.  
  79. protected:
  80.     void paintEvent( QPaintEvent * );
  81.     bool event( QEvent * );
  82.  
  83. private:
  84.     QMainWindowPrivate * d;
  85.     void triggerLayout();
  86.     void moveToolBar( QToolBar *, QMouseEvent * );
  87.  
  88.     virtual void setMenuBar( QMenuBar * );
  89.     virtual void setStatusBar( QStatusBar * );
  90.     virtual void setToolTipGroup( QToolTipGroup * );
  91. };
  92.  
  93.  
  94. #endif
  95.